package com.xuhnagchen.automation.entity;

public class Result<T> {


    /**
     * data : []
     * requestTime : 2016-11-02 14:00:25
     * code : 1
     */

    //private String requestTime;
    private int code;
    private T data;
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
        this.data = null;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Result message(int code, String msg) {
        this.code = code;
        this.msg = msg;
        return this;
    }

    public Result message(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        return this;
    }
}
